<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="cn">
  <head>
    <meta charset="utf-8">
    <title>未来城堡后台管理</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" type="text/css" href="/Public/Common/Css/bootstrap.css" /><link rel="stylesheet" type="text/css" href="/Public/Admin/css/theme.css" />
    <script type="text/javascript" src="/Public/Common/jquery-ui/js/jquery-191.js"></script>
    <script type="text/javascript" src="/Public/Common/jquery-ui/ui/jquery-ui.custom.js"></script>
	<script type="text/javascript" src="/Public/Common/lhgdialog/lhgdialog.min.js"></script><script type="text/javascript" src="/Public/Common/jquery-ui/ui/jquery.ui.core.js"></script><script type="text/javascript" src="/Public/Common/Js/common.js"></script>
     <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7"> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8"> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9"> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body> 
  <!--<![endif]-->
    
    <div class="navbar">
        <div class="navbar-inner">
            <div class="container-fluid">
                <ul class="nav pull-right">
                    
                     <li id="fat-menu" class="dropdown">
                        <a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i> Jack Smith
                            <i class="icon-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu">
                            <li><a tabindex="-1" href="#">Settings</a></li>
                            <li class="divider"></li>
                            <li><a tabindex="-1" href="sign-in.html">Logout</a></li>
                        </ul>
                    </li> 
                    
                </ul>
                <a class="brand" href="index.html"><span class="first"></span> <span class="second"><?php echo ($siteName); ?></span></a>
            </div>
        </div>
    </div>
    <div class="container-fluid">  
    
        <div class="row-fluid">
            <div class="span3">
                <div class="sidebar-nav">
                  <div class="nav-header" data-toggle="collapse" data-target="#dashboard-menu"><i class="icon-dashboard"></i>网站设置</div>
                    <ul id="dashboard-menu" class="nav nav-list collapse in">
                        <li><a href="<?php echo U('Admin/Setting/index',array('type'=>'base'));?>">基本设置</a></li>
                        <li ><a href="<?php echo U('Admin/Banner/index');?>">横幅设置</a></li>
                        <li ><a href="<?php echo U('Admin/Setting/index',array('type'=>'aboutus'));?>">关于网站</a></li>
                        <li ><a href="<?php echo U('Admin/Setting/index',array('type'=>'scope'));?>">业务范围</a></li>
                        <li ><a href="<?php echo U('Admin/Setting/index',array('type'=>'contactus'));?>">联系我们</a></li>
                    </ul>
                <div class="nav-header" data-toggle="collapse" data-target="#accounts-menu"><i class="icon-briefcase"></i>内容管理</div>
                <ul id="accounts-menu" class="nav nav-list collapse in">
                	<li ><a href="<?php echo U('Admin/News/index');?>">新闻管理</a></li>
                	<li ><a href="<?php echo U('Admin/Video/index');?>">视频管理</a></li>
                    <li ><a href="<?php echo U('Admin/Competition/index');?>">比赛管理</a></li>
                </ul>

                <div class="nav-header" data-toggle="collapse" data-target="#settings-menu"><i class="icon-exclamation-sign"></i>成员管理</div>
                <ul id="settings-menu" class="nav nav-list collapse in">
					<li ><a href="<?php echo U('Admin/Member/index');?>">成员管理</a></li>
                </ul>
            </div>
        </div>
        <div class="span9">

    
<link rel="stylesheet" type="text/css" href="/Public/Common/uploadify/uploadify.css" />
<script type="text/javascript" src="/Public/Common/uploadify/jquery.uploadify.min.js"></script>
<style>
.banner-img {
	width:120px;
	height:auto;
}
</style>
<div id="content" class="container_16 clearfix">
	<div class="btn-toolbar">
			<div id="addBtn"></div>
	</div>
	
	<div class="well">
			<table class="table" id="blist">
				<thead>
					<tr>
						<th>图片</th>
						<th>路径</th>
						<th>删除</th>
					</tr>
				</thead>
				<tbody>
					<?php if(is_array($banners)): $i = 0; $__LIST__ = $banners;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$banner): $mod = ($i % 2 );++$i;?><tr>
							<td><img src="<?php if(empty($banner["thumb"])): echo ($banner["path"]); else: echo ($banner["thumb"]); endif; ?>" class="img-polaroid banner-img" /></td>
							<td><?php echo ($banner["path"]); ?></td>
							<td>
								<a href="#" ctype='drop' acturl="<?php echo U('Admin/Banner/delete',array('id'=>$banner['id']));?>" role="button"><i class="icon-remove"></i></a>
							</td>
						</tr><?php endforeach; endif; else: echo "" ;endif; ?>
				</tbody>		
			</table>
		
	</div>
</div>
<script type="text/javascript">
$(function() {
    $("#addBtn").uploadify({
    	'buttonText' : '添加图片',
    	'buttonClass': '',
        'swf'      : '__PUBLIC__/Common/uploadify/uploadify.swf',
        'uploader' : '<?php echo U("Admin/Banner/add");?>',
        'onUploadSuccess' : function(file, data, response) {
            var jsonData = JSON.parse(data);
            if( jsonData.error==0 ){
            	window.location.reload();
            	showsuccess('上传成功');
            }
            else{
            	showerror('上传失败');
            }
        } 
    });
});
</script>

        </div>

</div>
<div id="foot">
	<a href="#">Contact Me</a>
</div>
</div>
<script type="text/javascript" src="/Public/Common/Js/bootstrap.min.js"></script>

	</body>
</html>